projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0fd1484
)
[XEN][POWERPC] Fix xchg macro.
author
Hollis Blanchard
<hollisb@us.ibm.com>
Thu, 12 Apr 2007 15:27:05 +0000
(10:27 -0500)
committer
Hollis Blanchard
<hollisb@us.ibm.com>
Thu, 12 Apr 2007 15:27:05 +0000
(10:27 -0500)
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
xen/include/asm-powerpc/system.h
patch
|
blob
|
history
diff --git
a/xen/include/asm-powerpc/system.h
b/xen/include/asm-powerpc/system.h
index 7eb41c9325fc92daad107619b174262ebc9da8ba..c0f21c64d03423d1e3d493e5d2ea53118569b939 100644
(file)
--- a/
xen/include/asm-powerpc/system.h
+++ b/
xen/include/asm-powerpc/system.h
@@
-28,7
+28,11
@@
#include <asm/processor.h>
#include <asm/msr.h>
-#define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr))))
+#define xchg(ptr,x) \
+({ \
+ __typeof__(*(ptr)) _x_ = (x); \
+ (__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, sizeof(*(ptr))); \
+})
static __inline__ unsigned long
__xchg_u32(volatile int *m, unsigned long val)